import Vue from 'vue'
//1.1导入路由的包
import VueRouter from 'vue-router'
//1.2安装路由
Vue.use(VueRouter)
//导入vue-resource
import VueResource from 'vue-resource'
//安装vue-resource
Vue.use(VueResource)

// Vue.http.options.root = 'http://vue.studyit.io';

import moment from 'moment'
Vue.filter('dateFormat',function(dataStr,pattern = "YYYY-MM-DD HH:mm:ss"){
  return moment(dataStr).format(pattern)
})


import app from './App'
import './lib/mui/css/mui.css'
import './lib/mui/css/icons-extra.css'

import { Header,Swipe, SwipeItem, Button} from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.component(Header.name,Header)
Vue.component(Swipe.name, Swipe)
Vue.component(SwipeItem.name, SwipeItem)
Vue.component(Button.name, Button)

//1.3导入自己的router.js路由模块
import router from './router.js'

var vm = new Vue({
  el: '#app',
  render: c => c(app),
  router
  //1.4挂载路由对象到vm实例上
})
